//通过字面量的形式赋值
// let num = new Array(0)// ===> [];

let num = 123

//ts中字面量类型
let str: "你好世界" = "你好世界"
//error: type '"xhjwje"' is not assignable to type '"你好世界"'.
//字面量类型 只能赋值 字面量
// str = "xhjwje"

//字面量结合联合类型
//为了确保当前变量不会被其他一些非相关的值覆盖
type Color = "red" | "green"
let color: Color = "red"
color = "green"
// let url


//枚举类型
/*
enum Color {Red, Green, Blue}
let c: Color = Color.Green;*/
